-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Copy Paste Data #2928
Copy Paste Data #2928
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! Some suggestions before we merge.
-
Could we have a simple e2e test for this? I'd like to avoid accumulating more features that we'll only be able to catch manually if they regress.
-
It looks like the temporary file created to hold the contents of the paste buffer is left behind after the operation. Can we make sure that gets deleted? I know we've rationalized things like leaving behind the temp files we create for pcap extraction because users might keep working on them in Wireshark, but for this case I don't see a reason to let them accumulate (and we've had users come to us concerned about droppings we've left behind in temp). My bigger concern is that there might still be environments (particularly Linux) where multiple desktop users live off the same host. Right now when running with defaults on Linux, Zui's temporary files land in
/tmp
, so it seems like two different users both using this feature have the potential to step on each other's/tmp/clipboard.txt
(whether that be one user's temp file overwriting someone else's or one user's temp file not able to be created because they lack the permissions to stomp the other user's temp file). -
Instead of the paste buffer always going to a static file called
clipboard.txt
, could we use one of those functions that's guaranteed to make a temp file with a unique name? Even if we do what I suggested in my prior bullet I can imagine scenarios (e.g., crashes) where temp files would still get left behind and hence leave the potential for things like I described in the prior bullet. -
The way it's working now I noticed that if I start Preview & Load based on the contents of the paste buffer, I can click "Add" and lump on more files from disk to the single load operation, which is pretty cool (see video below). Unfortunately it seems I can't do the reverse, i.e., initiate Preview & Load with one or more regular files and then lump on the paste buffer contents in addition to that, since if I'm at the Preview & Load screen and invoke "Paste Data..." it replaces all the files currently staged for load just like if I dragged a regular file into an already-open Preview & Load screen. I expect this feature will primarily be used for one-off pastes of data like spreadsheets similar to how we've been testing it so it probably doesn't make sense to do anything fancy like add a separate +Add Paste Buffer button on the Preview & Load screen. But I thought I'd point it out just in case.
Closes #2909
Bugs: